Developer Documentation

QuickTime 4 API Documentation

QuickTime 4 Reference

| Previous | Chapter Contents | Chapter Top | Next |

Accessing the Input Image

These functions are used by format-specific graphics exporters. When doing a standalone export, an exporter will typically call GraphicsExportGetInputImageDescription or GraphicsExportGetInputImageDimensions and GraphicsExportGetInputImageDepth to determine the image's bounds and depth, and then allocate an offscreen GWorld and call GraphicsExportDrawInputImage to draw portions of the image into the GWorld .


GraphicsExportGetInputImageDescription

Returns an image description describing the input image.

pascal ComponentResult GraphicsExportGetInputImageDescription(
                     GraphicsExportComponent ci,
                                          ImageDescriptionHandle *desc);
ci
Specifies the component instance that identifies your connection to the graphics exporter component.
desc
Points to a variable to receive a handle to an image description structure.

DISCUSSION

The GraphicsExportGetInputImageDescription function returns an image description structure containing information such as the format of the compressed data, its bit depth, natural bounds, and resolution. The caller is responsible for disposing of the returned image description handle.

RESULT CODES

noErr 0 No error
paramErr -50 Invalid parameter specified
memFullErr -108 Not enough memory available

GraphicsExportGetInputImageDimensions

Returns the dimensions of the input image.

pascal ComponentResult GraphicsExportGetInputImageDimensions ( GraphicsExportComponent ci,
                                         Rect *dimensions);
ci
Specifies the component instance that identifies your connection to the graphics exporter component.
dimensions
Points to a rectangle to receive the dimensions of the input image.

GraphicsExportGetInputImageDepth

Returns the depth of the input image.

pascal ComponentResult GraphicsExportGetInputImageDepth ( GraphicsExportComponent ci,
                                         long *inputDepth);
ci
Specifies the component instance that identifies your connection to the graphics exporter component.
inputDepth
Points to a variable to receive the input image depth.

GraphicsExportDrawInputImage

Draws a rectangular portion of the input image.

pascal ComponentResult GraphicsExportDrawInputImage (GraphicsExportComponent ci,
                                         CGrafPtr gw,
                                         GDHandle gd,
                                         const Rect *srcRect,
                                         const Rect *dstRect);
ci
Specifies the component instance that identifies your connection to the graphics exporter component.
gw, gd
Specify a drawing environment such as you might pass to SetGWorld.
srcRect
Specifies a portion of the input image.
dstRect
Specifies where in the drawing environment to draw that portion of the input image.

srcRect and dstRect need not be the same width and height; you can use this function to scale the image portion. This would be useful, for example, if you were writing a graphics exporter for a multiple-resolution format.


© 1999 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |